package com.pig4cloud.pig.api.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Objects;

@Data
public class PlanBaseAttrVo {
	//===========公共属性，根据统计类别，业务含义不同，例如广告计划，则为广告id，广告名称

	private String day; //数据唯一标识

	private String id; //数据唯一标识

	@ExcelProperty("名称")
	private String name; //数据名称

	@ExcelProperty("广告账户名称")
	private String adAccountName;

	@ExcelProperty("广告账户名称ID")
	private String adAccountId;

	private String convertName; //目标转化名称

	@ExcelProperty("目标转化")
	private String convertDescri; //目标转化描述

	// 深度转化目标
	private String deepConvert;

	// 转化统计方式
	private String convertDataType;

	//===========公共指标属性
	@ExcelProperty("返点后消耗（总成本）")
	private BigDecimal cost; //cost

	/*public BigDecimal getCost() {
		if (Objects.isNull(cost)) {
			return new BigDecimal(0);
		}
		return cost;
	}*/

	// 返点后消耗（总成本）
	@ExcelProperty("消耗")
	private BigDecimal rudeCost = new BigDecimal(0); //rudeCost

	/*public BigDecimal getRudeCost() {
		if (Objects.isNull(rudeCost)) {
			return new BigDecimal(0);
		}
		return rudeCost;
	}*/

	@ExcelProperty("新增设备注册数")
	//新增设备注册数(新用户注册)
	private Integer usrnamenums; //usrnamenums

	/*public Integer getUsrnamenums() {
		if (Objects.isNull(usrnamenums)) {
			return 0;
		}
		return usrnamenums;
	}*/

	//返点后消耗 / 新增设备注册数
	@ExcelProperty("设备成本")
	private BigDecimal deviceCose = new BigDecimal(0);

	// 首日LTV  首日充值金额 / 新增设备注册数
	@ExcelProperty("首日LTV")
	private BigDecimal firstDayLtv = new BigDecimal(0);

	@JsonIgnore
	@ApiModelProperty("新增设备付费数")
	private Integer paydevice1 = 0;

	@ApiModelProperty("新增充值实付金额（分成前）")
	private BigDecimal newdevicefees;

	@ApiModelProperty("新增充值实付金额（分成后）")
	private BigDecimal worth1 = new BigDecimal(0);

	@ApiModelProperty("新增充值代金券金额（分成前）")
	private BigDecimal newdevicegivemoney = new BigDecimal(0);

	@ApiModelProperty("新增充值代金券金额（分成后）")
	private BigDecimal newdeviceshargivemoney = new BigDecimal(0);

	@ApiModelProperty("累计充值实付金额（分成前）")
	private BigDecimal totalPayfee = new BigDecimal(0);

	@ApiModelProperty("累计充值实付金额（分成后）")
	private BigDecimal userfeeAll = new BigDecimal(0);

	@ApiModelProperty("累计充值代金券金额（分成前）")
	private BigDecimal totalPaygivemoney = new BigDecimal(0);

	@ApiModelProperty("累计充值代金券金额（分成后）")
	private BigDecimal totalPayshargivemoney = new BigDecimal(0);

	@ExcelProperty("新增付费率")
	//新增设备付费数/新增设备注册数
	private BigDecimal regPayRatio = new BigDecimal(0); // paydeviceAll usrnamenums

	@ExcelProperty("首日ROI")
	// 新增充值金额 / 返点后消耗
	private BigDecimal roi1 = new BigDecimal(0); // worth1 cost

	// 次留: 新增设备在次日有登录行为的设备数/新增设备注册数
	@ExcelProperty("次留")
	@ApiModelProperty("次留")
	@JsonProperty("retention2Ratio")
	private BigDecimal retention2Ratio = new BigDecimal(0);
	private Integer retention2 = 0; //设备次日留存数

	//总roi 累计充值金额/总消耗
	@ExcelProperty("累计充值ROI")
	@ApiModelProperty("累计充值ROI ")
	private BigDecimal allRoi = new BigDecimal(0);

	// 新增付费ARPPU
	private BigDecimal newPayArppu;

	// 新增注册创角数
	private Integer createRoleCount;

	// 新增注册创角率
	private BigDecimal createRoleRate;

	// 新增注册实名数
	private Integer certifiedCount;

	// 注册未实名数
	private Integer notCertifiedCount;

	// 未成年人数
	private Integer youngCount;

	// 新增实名转化率
	private BigDecimal certifiedRate;

	// 新增充值金额
	/*@ApiModelProperty("新增充值金额（代金券）")
	private BigDecimal givemoneyAll = new BigDecimal(0);
	@ExcelProperty("累计充值金额")
	// 新增充值金额
	@ApiModelProperty("累计充值金额")
	private BigDecimal allTopUpAmount = new BigDecimal(0);*/

	/*public BigDecimal getAllTopUpAmount() {
		allTopUpAmount = userfeeAll;
		return allTopUpAmount;
	}*/
}
